package com.kaishengit.service;

import java.util.List;

import com.kaishengit.dao.ProductDao;
import com.kaishengit.entity.Product;

public class ProductService {
	ProductDao dao = new ProductDao();

	public List<Product> findAll() {
		return dao.findALL();
	}

	public void save(Product product) {
		Product p = dao.finByProdId(product.getProdid());
		if (p == null) {
			dao.save(product);
		}
		
	}

	public void delete(int id) {
		dao.delete(id);
		
	}
}
